package com.gragra.parseOptions;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
/**
 * this interface should be implemented by commandLine options. an implementing class will be fed the (possibly
 * empty) list of arguments that were assigned to it from the commandLine and then must either
 * be able to produce some internal state from this or throw a CommandLineException
 * @author Christoph Teichmann
 * 21.04.2013
 */
public interface OptionInformation
{
	/**
	 * returns the descriptions of this option, which should include which arguments it needs/accepts
	 * @return
	 */
	String getDescription();
	/**
	 * called by the Parser that is used to process a commandLine, the list of arguments should be 
	 * used to set the internal state of the option, the list will be cleared and re-used once this method has
	 * has been called; if the arguments can not be used to set the internal state of the option, then a
	 * CommandLineException should be thrown
	 * @param arguments
	 * @throws CommandLineException
	 */
	void processArguments(ObjectArrayList<String> arguments) throws CommandLineException;
	/**
	 * should return true if the method has been correctly set on the last call of processArguments, should 
	 * return false if processArguments has not been called
	 * @return
	 */
	boolean hasBeenSet();
}